var express = require('express');
var router = express.Router();

var nodemailer = require("nodemailer");
var smtpTransport = require('nodemailer=smtp-transport');
var settingConfig = require('../config/settingConfig.js');

var smtp = settingConfig["smtp"];
var mailFrom = settingConfig["mailFrom"];
var mailPwd = settingConfig["mailPwd"];

function emailTo(email,subject,text,html,callback){
    var transporter = nodemailer.createTransport(smtpTransport({
        host:smtp,
        secure:true,
        secureConnection:true,
        port:456,
        quth:{
            type:'login',
            user:mailFrom,
            pass:mailPwd
        }
    }))
}
